#include "widget.h"
#include "ui_widget.h"
#include <QPushButton>
#include <QDebug>
Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
}

Widget::~Widget()
{
    delete ui;

}


void Widget::on_pushButton_clicked()
{
    qDebug() << "执行槽函数";
}

void Widget::on_pushButton_2_clicked()
{
    //切换第一个按钮的可用状态
    if(ui->pushButton->isEnabled() == false)
    {
        ui->pushButton->setEnabled(true);
    }
    else
    {
        ui->pushButton->setEnabled(false);
    }
    qDebug() << "按钮状态已切换";
}
